#include "../Graphic/Graphic.h"
#include "Entity.h"
#include "Worker.h"

#define sin_d(x) (sin((x)*M_PI/180))
#define cos_d(x) (cos((x)*M_PI/180))


void Worker_Walk( struct sEntity *Obj, int R, int Speed)
{
    int X, Y;

    X = ( sin_d(R)*Speed ) + 0.499994; /* kA wie das geht! Frag google */
    Y = ( cos_d(R)*Speed ) + 0.499994;

    Obj->X += X;
    Obj->Y += Y;
}

void Entity_Worker( struct sEntity *Obj )
{
    int mX, mY;

    mX = XIso( Obj->X, Obj->Y);
    mY = YIso( Obj->X, Obj->Y);

    World_RoadIso(mX, mY);

    switch(Obj->WorkProcess)
    {
        case 0:

        break;
        case 1:

        break;
    }

}

void Entity_Worker_Graphic( struct sEntity *Obj )
{
    int i;
    Obj->Animation_Num = Obj->Animation_Num%3;
    i = Graphic_Human((int)Obj->X, (int)Obj->Y, (int)Obj->Z, 0, Obj->Animation_Num);
    Obj->Animation_Num = i;
}
